<?php
error_reporting(E_WARNING);
include_once '../includes/metodos.php';
include_once 'action.php';
connectSql();
checkUser();

if(!empty($_POST['cmd']) && $_POST['cmd']=='insert'){
	insert();
}
include_once '../header.php';
?>
<body> 
<!-- Start: page-top-outer -->
<div id="page-top-outer">    
	<?php include_once '../menu.php';?>

<div id="page-heading"><h1>Adicionar Cliente</h1></div>

<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
	<th rowspan="3" class="sized"><img src="<?php echo EXTERNAL_ROOT_PORTAL;?>/css/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th rowspan="3" class="sized"><img src="<?php echo EXTERNAL_ROOT_PORTAL;?>/css/images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td>
	<!--  start content-table-inner -->
	<div id="content-table-inner">
	<h3>&Eacute; obrigat&oacute;rio preencher os campos com *</h3><br/>
<table border="0" cellpadding="0" cellspacing="0"  id="id-form">
		<form method="post" action="new.php">
			<tr>
				<th valign="top">Nome Completo *</th>
				<td><input type="text" class="inp-form" name="nome" /></td>
				<th valign="top">E-mail</th>
				<td><input type="text" class="inp-form" name="email" /></td>
			</tr>
			<tr>
				<th valign="top">Rua</th>
				<td><input type="text" class="inp-form" name="rua" /></td>
				<th valign="top">N&uacute;mero</th>
				<td><input width="20px" type="text" class="inp-form" name="numero" /></td>
			</tr>
			<tr>
				<th valign="top">Bairro</th>
				<td><input type="text" class="inp-form" name="bairro" /></td>
				<th valign="top">Complemento</th>
				<td><input type="text" class="inp-form" name="complemento" /></td>
			</tr>
			<tr>
				<th valign="top">Telefone</th>
				<td><input type="text" class="inp-form" name="tel" /></td>
				<th valign="top">Celular</th>
				<td><input type="text" class="inp-form" name="cel" /></td>
			</tr>
			<tr>
				<th>Anivers&aacute;rio:</th>
				<td>
					<select name="dia">
						<?php 
							$count = 1;
							while($count < 32){
								echo '<option value="'.$count.'">'.$count.'</option>';
								++$count;
							}
						?>
					</select>
					<select name="mes">
						<option value="01">Janeiro</option>
						<option value="02">Fevereiro</option>
						<option value="03">Mar&ccedil;o</option>
						<option value="04">Abril</option>
						<option value="05">Maio</option>
						<option value="06">Junho</option>
						<option value="07">Julho</option>
						<option value="08">Agosto</option>
						<option value="09">Setembro</option>
						<option value="10">Outubro</option>
						<option value="11">Novembro</option>
						<option value="12">Dezembro</option>
					</select>
				</td>
			</tr>
			<input type="hidden" name="cmd" value="insert"/>
			<td valign="top">
				<td><input class="form-submit" type="submit" value=""></td>
			</td>
		</form>
 </table>
<div class="clear"></div>

</div>
<!--  end content-table-inner  -->
</td>
<td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</table>

<div class="clear">&nbsp;</div>

</div>
<!--  end content -->
<div class="clear">&nbsp;</div>
</div>
<!--  end content-outer -->

<div class="clear">&nbsp;</div>
    
<!-- start footer -->         
<div id="footer">
	<!--  start footer-left -->
	<div id="footer-left">
	Admin Skin &copy; Copyright Internet Dreams Ltd. <a href="">www.netdreams.co.uk</a>. All rights reserved.</div>
	<!--  end footer-left -->
	<div class="clear">&nbsp;</div>
</div>
<!-- end footer -->
 
</body>
</html>